package de.puc.defencetower.model;



public abstract class Monster extends MapElement{

	public static final int MONSTERTYPE_SMALL = 0;
	public static final int MONSTERTYPE_BIG = 1;
	
	private double hitPoints;
	private double hitMaxPoints;
	private int goldValue;
	
	private boolean alive;
	@SuppressWarnings("unused")
	private Map map;
	
	public Monster(double hitPoints, int goldValue, Map map){
		this.hitPoints = hitPoints;
		this.hitMaxPoints = hitPoints;
		this.goldValue = goldValue;
		this.map = map;
		alive = true;
	}

	public double getHitPoints() {
		return hitPoints;
	}
	
	public double getMaxHitPoints() {
		return hitMaxPoints;
	}
	
	public void damageIt(double damage){
		if(isAlive()){
			hitPoints -= damage;
			if(hitPoints <= 0){
				alive = false;
			}
		}
	}
	
	public abstract int getType();
	
	public int getGoldValue() {
		return goldValue;
	}

	public boolean isAlive(){
		return alive;
	}
	
}
